package com.cpimex.eprice.model.users;

import java.sql.Connection;
import java.util.*;


public class Ejecutivo extends Usuario{

    public Ejecutivo() {
    }

    public ArrayList listado(Connection conn,String str_query2, Map map_where, int int_ordenar, boolean bol_orderAsc) throws Exception {

        ArrayList arr_result = null;
        System.out.println("entro a model.users.ejecutivo.listado"); //level 5 ***
        String str_query = super.str_query;
        //str_query += " where  codigoVen_sol =  '" + getStr_nomina() + "' ";
        str_query += " where  codigoVen_sol <>  '' "; // Modificacion Dario 091027

        String str_coord     = map_where.get("str_coord")==null || map_where.get("str_coord").equals("") ?"":((String) map_where.get("str_coord"));
        String str_gerente   = map_where.get("str_gerente")==null || map_where.get("str_gerente").equals("") ?"":((String) map_where.get("str_gerente"));

        str_query +=
                (str_coord.equals("")    ?"":" AND  " + " coordinadoraCli_sol = '" + str_coord + "' ") +
//              level 5 2009 09 05 R2-3 Actualizar referencias a tabla ep_claseProd por cambio de registros
                //(str_gerente.equals("")  ?"":" AND  " + " claseProducto_sol = '" + str_gerente + "' ");
                (str_gerente.equals("")  ?"":" AND  " + " codigoDivision_detSol = '" + str_gerente + "' ");

        arr_result = super.listado(conn, str_query, map_where, int_ordenar, bol_orderAsc);

        return arr_result;
    }
}


